<#ftl output_format="HTML" >
<#assign allModules = { '1': '公告', '2': '介绍' }>
<form method="POST" class="form-horizontal" >
    <div class="form-group">
        <label for="title">标题：</label>
        <@spring.formInput "category.title" 'class="form-control" maxlength="80" placeholder="标题"' />
    </div>
    <div class="form-group">
        <label for="description">描述：</label>
        <@spring.formTextarea "category.description" 'class="form-control" placeholder="描述" rows="3" autofocus' />
    </div>
    <div class="form-group">
        <label for="description">每页记录数：</label>
        <@spring.formInput "category.pageSize" 'class="form-control" placeholder="每页记录数" type="number" min="0" max="1000"' />
    </div>
    <div class="form-group">
        <label for="description">模块：</label>
        <@spring.formSingleSelectWithNone "category.module" allModules 'class="form-control" style="width: 10em" required' />
    </div>
    <div class="form-group">
        <label for="authority">权限<small class="text-danger">（空白表示不需要任何权限或者使用上级栏目的设置，星号表示需要登录）</small>：</label>
        <@spring.formInput "category.authority" 'class="form-control" maxlength="200" placeholder="权限"' />
    </div>
    <div class="form-group">
        <div class="form-check">
            <@spring.formCheckbox "category.enabled" 'class="form-check-input"' />
            <label for="enabled" class="form-check-label">启用</label>
        </div>
    </div>
    <div class="form-group">
        <label for="tpl1.id">目录模板：</label>
        <@spring.formInput "category.tpl1" 'class="form-control" maxlength="400" placeholder="目录模板" ' />
    </div>
    <div class="form-group">
        <label for="tpl2.id">内容模板：</label>
        <@spring.formInput "category.tpl2" 'class="form-control" maxlength="400" placeholder="内容模板" ' />
    </div>
    <div class="form-group">
        <input type="submit" class="btn btn-primary" value="保存" />
    </div>
</form>
